package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.HrRoleAddDTO;
import org.jsola.hr.dto.HrRoleUpdateDTO;
import org.jsola.hr.query.HrRoleQuery;
import org.jsola.hr.vo.HrRoleListVO;
import org.jsola.hr.vo.HrRoleVO;

import java.util.List;

/**
 * 人力角色表
 *
 * @author zhr
 */
@Api(tags = "hr-人力角色表")
public interface IHrRoleControllerAPI {

    /**
     * 新增人力角色表
     *
     * @param hrRoleAddDTO 人力角色表新增实体
     * @return 人力角色表展示对象
     */
    @ApiOperation(value = "新增人力角色表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "hrRoleAddDTO", dataType = "HrRoleAddDTO", value = "新增人力角色表", paramType = "body")
    })
    Result<HrRoleVO> save(HrRoleAddDTO hrRoleAddDTO);


    /**
     * 修改人力角色表
     *
     * @param hrRoleUpdateDTO 人力角色表
     * @return 更新数量
     */
    @ApiOperation(value = "修改人力角色表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "hrRoleUpdateDTO", dataType = "HrRoleUpdateDTO", value = "修改人力角色表", paramType = "body")
    })
    Result<Integer> update(HrRoleUpdateDTO hrRoleUpdateDTO);


    /**
     * 删除单个人力角色表，彻底删除
     *
     * @param hrRoleId 人力角色表id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个人力角色表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "hrRoleId", dataType = "Long", value = "人力角色表id", paramType = "path")
    })
    Result<Integer> delete(Long hrRoleId);


    /**
     * 批量删除人力角色表，彻底删除
     *
     * @param hrRoleIds 人力角色表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除人力角色表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "hrRoleIds", dataType = "Long[]", value = "人力角色表id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(Long[] hrRoleIds);


    /**
     * 根据人力角色表id查询人力角色表详情
     *
     * @param hrRoleId 人力角色表id
     * @return 人力角色表详情
     */
    @ApiOperation(value = "根据人力角色表id查询人力角色表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "hrRoleId", dataType = "Long", value = "人力角色表id", paramType = "path")
    })
    Result<HrRoleVO> findById(Long hrRoleId);


    /**
     * 查询人力角色表
     *
     * @param hrRoleQuery 人力角色表查询参数
     * @return page
     */
    @ApiOperation(value = "查询人力角色表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "hrRoleQuery", dataType = "HrRoleQuery", value = "人力角色表查询参数", paramType = "query")
    })
    Result<List<HrRoleListVO>> listAll(HrRoleQuery hrRoleQuery);


    /**
     * 查找渠道角色，没有就创建
     *
     * @return 渠道角色
     */
    @ApiOperation(value = "查找渠道角色，没有就创建")
    Result<HrRoleVO> selectChannelHrRole();


    /**
     * 查询人力角色表(分页)
     *
     * @param hrRoleQuery 人力角色表查询参数
     * @return page
     */
    @ApiOperation(value = "查询人力角色表(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "hrRoleQuery", dataType = "HrRoleQuery", value = "人力角色表查询参数", paramType = "query")
    })
    Result<Page<HrRoleListVO>> listPage(HrRoleQuery hrRoleQuery);

    /**
     * 分页查询人力角色表
     *
     * @param hrRoleQuery 人力角色表查询参数
     * @return page
     */
    @ApiOperation(value = "分页查询人力角色表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "hrRoleQuery", dataType = "HrRoleQuery", value = "人力角色表查询参数", paramType = "query")
    })
    Result<Page<HrRoleListVO>> page(HrRoleQuery hrRoleQuery);


    @ApiOperation(value = "删除控制台租户管理中超级管理的角色")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleIds", value = "角色id数组", dataType = "Long", paramType = "body", allowMultiple = true, required = true),
    })
    Result<String> deleteRoles(Long[] roleIds);

}

